package com.company.service.impl;

import com.company.bean.UserInfoBean;
import com.company.dao.UserInfoBeanMapper;
import com.company.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements IUserService {

    //依赖注入dao层
    @Resource
    private  UserInfoBeanMapper userInfoBeanMapper;

    public UserInfoBeanMapper getUserInfoBeanMapper() {
        return userInfoBeanMapper;
    }

    public void setUserInfoBeanMapper(UserInfoBeanMapper userInfoBeanMapper) {
        this.userInfoBeanMapper = userInfoBeanMapper;
    }

    @Override
    public boolean doLogin(UserInfoBean userInfoBean) {

        //调用dao层进行用户的登录逻辑处理

        UserInfoBean userInfoBean1 = userInfoBeanMapper.doLogin(userInfoBean);
        System.out.println("查询到的结果集："+userInfoBean1);
        return userInfoBean != null;

    }
}
